
const task = {
  state: {
    detail: {},
    appSetting: {
      home: {
        bgImg: '',
        bgStyle: {}
      },
      activeProcess: {
        bgImg: '',
        bgStyle: {}
      },
      answerAnalysis: {
        bgImg: '',
        bgStyle: {}
      },
      successfulChallenge: {
        successImg: '',
        bgImg: '',
        bgStyle: {}
      },
      shareEffect: {
        share: {
          title: '',
          content: '',
          icon: ''
        },
        bgImg: '',
        bgStyle: {}
      }
    }
  },
  mutations: {
    changeTaskDetail(state, detail) {
      state.detail = detail
    },
    changeTaskAppSetting(state, appSetting) {
      state.appSetting = {
        ...state.appSetting,
        ...appSetting
      }
    },
    changeShareEffect(state, obj) {
      state.appSetting.shareEffect = {
        ...state.appSetting.shareEffect,
        ...obj
      }
    }
  }
}

export default task
